package com.dys.designpattern.singleton.applicationscenarios;

/**
 * @author 田建松
 * @version V1.0.0
 * @description 单例-枚举
 * @date 2024/5/10
 * @since 1.0
 */
public enum SerialGenerator_Enum {

    INSTANCE;
    private long code;
    public synchronized long next() {
        return ++code;
    }
}
